<div class="col-lg-12" style="margin-left: 10px;width: 500px; height: auto; margin-top:20px;">
    <form id="AppFormAdd" action="{:url('dlc/admin/adminAdd')}" method="post" class="form-horizontal" data-bv-message="" data-bv-feedbackicons-valid="glyphicon glyphicon-ok" data-bv-feedbackicons-invalid="glyphicon glyphicon-remove" data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
        <div class="form-group">
            <label class="col-lg-3 control-label">管理员用户名 :<sup>*</sup></label>
            <div class="col-lg-9">
                <input class="form-control"  type="text" name="username" placeholder="管理员用户名" value="" data-bv-notempty />
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-3 control-label">管理员昵称 :<sup>*</sup></label>
            <div class="col-lg-9">
                <input class="form-control" type="text" name="nickname" placeholder="管理员昵称" value="" data-bv-notempty />
            </div>
        </div>

        <div class="form-group" id="parentIcon">
            <label class="col-lg-3 control-label">密码 :<sup>*</sup></label>
            <div class="col-lg-9">
                <input class="form-control" type="text" name="password" placeholder="密码" value="" data-bv-notempty>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-3 control-label">手机号码 :<sup>*</sup></label>
            <div class="col-lg-9">
                <input class="form-control" type="text" name="mobile" placeholder="手机号码" value="" />
            </div>
        </div>

        <div class="form-group">
            <div class="col-lg-offset-6 col-lg-4">
                <button id="saveButton" style="margin-top: 5px;" class="btn btn-primary" type="submit">保存</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript">

    $('#AppFormAdd').bootstrapValidator({

        submitHandler: function(validator, form, submitButton) {

            var formNode = validator.$form.context;

            var tourl = formNode.action;

            var data = $(formNode).serialize();

            $.post(tourl, data, function(json) {

                if (json.code == 1) {
                    $.App.alert('success', json.msg);
                    $('.close').click();
                    $('#refresh-toggler').click();
                } else {
                    $.App.alert('danger', json.msg);
                }
            })
        }
    });
</script>